using System;
using L=Science.Physics.GeneralPhysics;

namespace Serway.Chapter39
{
	/// <summary>
	/// Example08: The Speeding Motorcycle
	/// Imagine a motorcycle moving with a speed 0.80c past a 
	/// stationary observer, as shown in Figure 39.16. If the rider 
	/// tosses a ball in the forward direction with a speed of 0.70c 
	/// relative to himself, what is the speed of the ball relative 
	/// to the stationary observer?
	/// </summary>
	public class Example08
	{
		public Example08()
		{
		}
		private string result;
		public string Result
		{
			get{return result;}
		}
		public void Compute()
		{
			L.Velocity v = new L.Velocity();
			v.X = 0.80*L.Constant.SpeedOfLightInVacuum;
			L.Velocity u = new L.Velocity();
			u.X = 0.96*L.Constant.SpeedOfLightInVacuum;
			L.Velocity up = new L.Velocity();
			L.Relativity.LorentzTransformationForVelocity(u,up,v);
			result+=Convert.ToString(up.X/L.Constant.SpeedOfLightInVacuum)+"\r\n";  
		}
	}
}
